"""
@Time ： 2021/10/14 17:40
@Auth ： ChenZhangkun
"""


class Person:
    def __init__(self, name, weight):
        # 赋值
        self.name = name
        self.weight = weight

    def __str__(self):
        return "我的名字叫 %s 体重是 %.2f公斤" % (self.name, self.weight)

    def run(self):
        print("%s爱跑步" % self.name)
        self.weight -= 5

    def eat(self):
        print("%s是吃货" % self.name)
        self.weight += 4.0


kd = Person("durant", 155.5)
kd.run()
print(kd)
kd.eat()
print(kd)
